package felix.rule.data.plugin;

import felix.actor.core.msg.TActorMsg;
import felix.actor.core.msg.TMsgType;
import felix.rule.data.msg.MessageType;
import lombok.Getter;
import lombok.ToString;

@ToString
public class ComponentLifecycleMsg implements TActorMsg {
    @Getter
    private final String ruleId;
    @Getter
    private final String type;
    @Getter
    private final String entityId;
    @Getter
    private final ComponentLifecycleEvent event;

    public ComponentLifecycleMsg(String ruleId, String type, String entityId, ComponentLifecycleEvent event) {
        this.ruleId = ruleId;
        this.type = type;
        this.entityId = entityId;
        this.event = event;
    }

    @Override
    public TMsgType getMsgType() {
        return MessageType.COMPONENT_LIFE_CYCLE_MSG;
    }
}
